#include "gamekit/drawing/Canvas.h"
#include "gamekit/drawing/Bitmap.h"
#include "gamekit/Component.h"
#include "gamekit/Window.h"

#include <math.h>

using namespace gamekit;

Canvas::Canvas(const int& x, const int& y, const uint& width, const uint& height, const uint& bpp, const uint& zIndex)
	: m_zIndex(zIndex),
	m_visible(true),
	m_x(x),
	m_y(y),
	m_width(width),
	m_height(height),
	m_bpp(bpp)
{
	init(width, height, bpp);
}

Canvas::Canvas(const int& x, const int& y, const SafePointer<Bitmap>& bitmap, const uint& zIndex)
	: m_zIndex(zIndex),
	m_visible(true),
	m_x(x),
	m_y(y),
	m_width(bitmap->width()),
	m_height(bitmap->height()),
	m_bpp(bitmap->bpp())
{
	init(bitmap->width(), bitmap->height(), bitmap->bpp());
	draw(bitmap, 0, 0);
}

Canvas::~Canvas()
{

}

unsigned int Canvas::zIndex(void) const
{
	return m_zIndex;
}

void Canvas::setzIndex(const unsigned int& zIndex)
{
	m_zIndex = zIndex;
}

bool Canvas::visible(void) const
{
	return m_visible;
}

void Canvas::setVisible(const bool& visible)
{
	m_visible = visible;
}

int Canvas::x(void) const
{
	return m_x;
}

void Canvas::setX(const int& x)
{
	m_x = x;
}

int Canvas::y(void) const
{
	return m_y;
}

void Canvas::setY(const int& y)
{
	m_y = y;
}

ushort Canvas::width(void) const
{
	return m_width;
}

ushort Canvas::height(void) const
{
	return m_height;
}

void Canvas::setWidth(const ushort& width)
{
	m_width = width;
}

void Canvas::setHeight(const ushort& height)
{
	m_height = height;
}

int Canvas::bpp(void) const
{
	return m_bpp;
}

void Canvas::draw(const unsigned int& elapsed)
{
}

void Canvas::init(const int& width, const int& height, const int& bpp)
{
}

void Canvas::draw(const SafePointer<Bitmap> bitmap, const int& x, const int& y)
{
}
